home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Modules
/
BackSpaceModules
/
Source
/
AquariumView
/
RotImage.h
< prev
next >
Wrap
Text File
|
1993-03-12
|
973b
|
42 lines
/*
*
* MyImage.h -- How to rotate an NXImage
*
* You may freely copy, distribute, and reuse the code in this example.
* NeXT disclaims any warranty of any kind, expressed or implied, as to its
* fitness for any particular use.
*
* Written by Henry Krempel -- NeXT Developer Support
*
* Wed Apr 10 17:39:50 1991
*
* Modified by Brian Glaeske -- glaeske@plains.NoDak.edu
*
* Sat Mar 14 21:06:04 1992
*
* I put in more functionality so the range of rotations can be from 0 to 360.
* The flip: method will flip vertically or horizontally. Only handles square images nicely.
*
*/
#import <appkit/NXImage.h>
#define HORIZONTAL 0
#define VERTICAL 1
@interface RotImage:NXImage
{
int rotation, flipped, flippedHor, flippedVer;
NXSize origSize, rotSize, *currentSize;
}
- initFromFile:(const char *)fileName;
- setRotation:(int)anInt;
- (BOOL)drawRepresentation:(NXImageRep *)imageRep inRect:(const NXRect *)rect;
- flip:(int)whichWay;
@end